﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;

namespace CustomORM.DataAccess
{
    public interface IDataAccess
    {
        [Obsolete("Instead use method: object InsertUpdateRow(RecordData recordData)")]
        object InsertUpdateRow(string tableName, object[] fieldsList, object[] fieldsValues, object[] keyFields, object[] keyValues);
        [Obsolete("Instead use method: object DeleteRow(RecordData recordData)")]
        void DeleteRow(string tableName, IEnumerable fieldsList, IEnumerable fieldsValues, IEnumerable keyFields);

        object InsertUpdateRow(RecordData recordData);
        void DeleteRow(RecordData recordData);
        DataTable SelectSQL(string selectSql, Dictionary<string, object> parameters = null);
        // TODO: add abstration over DbTransation and take into account that some implementations of data access might now work with it
        DbTransaction BeginTransaction();
    }
}